package com.lujianbuping.system.opportunityprojectmanagementsystem.dao;

import com.lujianbuping.system.opportunityprojectmanagementsystem.entity.RoleEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 角色Dao
 * @author 张渊
 *
 */
public interface RoleMapper {
	/**
	 * 插入数据
	 * @param record
	 * @return
	 */
    int insert(RoleEntity record);
    int insertSelective(RoleEntity record);
    
    /**
	 * 主键删除
	 * @param id
	 * @return
	 */
    int deleteByPrimaryKey(String id);
    
    /**
	 * 通过主键查询
	 * @param id
	 * @return
	 */
    RoleEntity selectByPrimaryKey(String id);
    
    /**
	 * 根据主键查询记录，然后将传入的其他属性修改
	 * 
	 * @param record
	 * @return
	 */
    int updateByPrimaryKeySelective(RoleEntity record);
    int updateByPrimaryKey(RoleEntity record);
    
    List<RoleEntity> selectAll(@Param("orderBy") String orderBy);

	List<RoleEntity> selectByKeyWithPagination(@Param("key") String key, @Param("pageNo") int pageNo,
                                               @Param("pageSize") int pageSize);
}